Skip to main content

Crate pipecrab_audio

Crate pipecrab_audio 

Source
Expand description

pipecrab-audio: the platform-neutral boundary where audio enters and leaves a pipeline.

pipecrab-core owns the frameAudioChunk and AudioFormat, re-exported here for convenience. This crate owns how audio crosses the pipeline edge: the AudioSource and AudioSink traits plus hardware-free mock implementations for tests. Concrete backends (e.g. cpal for desktop) live in their own crates behind these same traits.

Audio is a first-party pipeline payload — a typed DataFrame::Audio, never a Custom frame — so nothing here downcasts. Resampler defines audio-to-audio conversion, ResamplerStage adapts it to the pipeline, and RubatoSincResampler provides the bundled windowed-sinc default.

Modules§

mock
Hardware-free AudioSource / AudioSink implementations for tests.

Structs§

AudioChunk
A chunk of f32 PCM audio tagged with its own AudioFormat.
AudioFormat
The wire format of an AudioChunk: its sample rate and channel count.
ResamplerEffect
A conversion command emitted by ResamplerStage.
ResamplerStage
Adapts any Resampler into a pipeline Stage.
RubatoSincResampler
Streaming windowed-sinc sample-rate and channel-count conversion.

Enums§

AudioError
Why an AudioSource/AudioSink (or an underlying backend I/O) failed.
ResamplerError
Why an audio chunk could not be converted by a Resampler.

Traits§

AudioSink
A sink of audio flowing out of a pipeline (device playback, file, network, or a mock).
AudioSource
A source of audio flowing into a pipeline (device capture, file, network, or a mock).
Resampler
A synchronous, stateful audio-to-audio format converter.